package com.hc.controller;

import com.hc.appanimal.GalleryActivity;
import com.hc.appanimal.HomeActivity;
import com.hc.common.ActionEvent;
import com.hc.constants.Constants;
import com.hc.model.utils.AnimalCategoryMasterModel;

public class AnimalCategoryMasterController {
	public static AnimalCategoryMasterController instance;

	public static AnimalCategoryMasterController getInstance() {
		if (instance == null)
			instance = new AnimalCategoryMasterController();
		return instance;
	}

	public void handleViewEvent(ActionEvent e) {
		switch (e.action) {
		case Constants.GET_ALL_CATEGORY:
			AnimalCategoryMasterModel.getInstance().handleControllerEvent(e);
			break;
		default:
			break;
		}
	}

	public void handleModelViewEvent(ActionEvent e) {
		switch (e.action) {
		case Constants.GET_ALL_CATEGORY:
			HomeActivity sender = (HomeActivity) e.sender;
			sender.handleControllerViewEvent(e);
			break;

		default:
			break;
		}
	}
}
